package com.da.javatest.interview.basic.statics;

import static java.lang.Math.*;//静态导入

public class TestStatic {
    private static int a;//静态变量
    private int b;//非静态变量

    public static void main(String[] args) {//静态方法
        a = 2;
        System.out.println("a = " + a);
        //        System.out.println("b = " + this.b);

        System.out.println(PI);
        System.out.println(sqrt(9));
    }

    static {//静态代码块
        a = 1;
        System.out.println("a = " + a);
    }

    private static class Inner {//静态内部类

        public void inMethod() {
            System.out.println("a = " + a);
            //            System.out.println("b = " + b);
        }
    }
}
